<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .box{
        width: 100px;
        height: 100px;
        background-color: red;
    }
    .box1{
        width: 100px;
        height: 100px;
        background-color: yellow;
    }
    .box1-1{
        width: 100px;
    }
    .box1-2{
        height: 100px;
    }
    .box1-3{
        background-color: yellow;
    }
    .box2{
        width: 100px;
        height: 100px;
        background-color: green;
    }
    .box3{
        width: 100px;
        height: 100px;
        background-color: pink;
    }
</style>
<body>
    <div id="box">
        <div class="box"></div>

        <!-- v-bind 将标签上的属性变为动态  变量必须要有初始值 -->
        <div :class="box1"></div>
        <!-- 当有多个类名是可以使用数组的形式 -->
        <div :class="[box1One,box1Two,box1Three]"></div>
        <!-- 可以让div中box1这个类名  -->
        <div :class="{box1:show}"></div>

        <!-- style -->
        <div style="width: 100px;height: 100px;background-color:green">style</div>
        <div :style="yangshi1">fergtkml</div>



    </div>
    <script src="../js/vue.js"></script>
    <script>
        let vm = new Vue({
            el:'#box',
            data:{
                box1:'box1',
                box1One:'box1-1',
                box1Two:'box1-2',
                box1Three:'box1-3',
                show:false,
                yangshi1:{
                    fontSize:'50px'
                }
            }
        })
    </script>
</body>
</html>